diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-11-01 22:36:19 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-11-01 22:36:19 +0100 |
commit | 0e65f04e1e780865f80660df315e800e6b0cbccd (patch) | |
tree | 57672517091ace9b4785c288c8a6335df6bab337 /web/pw-server/src/routes/bots/[bot_name]/index.svelte | |
parent | 06a8ed945b4c517bb6cf5c84f0d06aa9ede37f11 (diff) | |
download | planetwars.dev-0e65f04e1e780865f80660df315e800e6b0cbccd.tar.xz planetwars.dev-0e65f04e1e780865f80660df315e800e6b0cbccd.zip |
move bot versions to its own tab
Diffstat (limited to 'web/pw-server/src/routes/bots/[bot_name]/index.svelte')
-rw-r--r-- | web/pw-server/src/routes/bots/[bot_name]/index.svelte | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/web/pw-server/src/routes/bots/[bot_name]/index.svelte b/web/pw-server/src/routes/bots/[bot_name]/index.svelte index afe2cc7..ae38d13 100644 --- a/web/pw-server/src/routes/bots/[bot_name]/index.svelte +++ b/web/pw-server/src/routes/bots/[bot_name]/index.svelte @@ -20,8 +20,6 @@ return { props: { bot, - owner, - versions, botStats, matches: matchesPage["matches"], errorMatches: errorMatchesPage["matches"], @@ -43,8 +41,6 @@ import LinkButton from "$lib/components/LinkButton.svelte"; export let bot: object; - export let owner: object; - export let versions: object[]; export let matches: object[]; export let errorMatches: object[]; </script> @@ -58,31 +54,6 @@ <div class="container"> {#if $currentUser && $currentUser["user_id"] === bot["owner_id"]} - <div> - <!-- TODO: can we avoid hardcoding the url? --> - Publish a new version by pushing a docker container to - <code>registry.planetwars.dev/{bot["name"]}:latest</code>, or using the web editor. - </div> - - <div class="versions"> - <h3>Versions</h3> - <ul class="version-list"> - {#each versions.slice(0, 10) as version} - <li class="bot-version"> - {dayjs(version["created_at"]).format("YYYY-MM-DD HH:mm")} - {#if version["container_digest"]} - <span class="container-digest">{version["container_digest"]}</span> - {:else} - <a href={`/code/${version["id"]}`}>view code</a> - {/if} - </li> - {/each} - </ul> - {#if versions.length == 0} - This bot does not have any versions yet. - {/if} - </div> - <div class="matches"> <h3>Matches with errors</h3> <MatchList matches={errorMatches} /> @@ -126,18 +97,4 @@ padding: 12px; text-align: center; } - - .versions { - margin: 30px 0; - } - - .version-list { - padding: 0; - } - - .bot-version { - display: flex; - justify-content: space-between; - padding: 4px 24px; - } </style> |